<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp" %>
<!-- 网页头部开始 -->
	<nav class="navbar navbar-default navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="http://cs.imnu.edu.cn/marcms/">WELCOME</a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
			<c:choose>
				<c:when test="${sessionScope.user != null }">
					<ul class="nav navbar-nav navbar-right">
						<li><a href="#">首页</a></li>
						<li><a href="${rootpath}/back/user/leaveList.htm">请假单列表</a></li>
						<li><a href="#">菜单列表</a></li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
							aria-expanded="true">${sessionScope.user.name} 
							<span class="caret"></span>
							</a>
							<ul class="dropdown-menu">
								<li><a href="info.html">个人信息</a></li>
								<li><a href="insert.html">修改信息</a></li>
								<li role="separator" class="divider"></li>
								<li><a href="list.html">用户列表</a></li>
							</ul>
						</li>
						<li><a href="${rootpath }/back/user/logout.htm" onclick="return confirm('确认退出吗?')">退出</a></li>
					</ul>
				</c:when>
				<c:otherwise>
					<ul class="nav navbar-nav navbar-right">
						<li><a href="#">首页</a></li>
						<li><a href="${rootpath}/login.htm">登陆</a></li>
						<li><a href="${rootpath }/regsiter.htm">注册</a></li>
					</ul>
				</c:otherwise>
			</c:choose>
				<form class="navbar-form navbar-right visible-sm">
					<input type="text" class="form-control" placeholder="Search...">
				</form>
			</div>
		</div>
	</nav>